package product;

public class TaskProducer implements Runnable {

    @Override
    public void run() {
        int index = 0;
        while (true) {
            try {
                PlayGround.productQueue.offer(new Product("product(产品):" + index, index));
                index++;
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
